<%@ Page Language="c#" Inherits="PHSRAG.Insight21.FinancialSummary" EnableSessionState="true"
    CodeFile="FinancialSummary.aspx.cs" %>

<%@ Register TagPrefix="cc1" Namespace="PHSRAG.Insight21.InsightWebControls" Assembly="PHSRAG.Insight21.InsightWebControls" %>
<%@ Register TagPrefix="cc2" Namespace="PHSRAG.WebControls" Assembly="PHSRAG.WebControls" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>FinancialSummary</title>
    <link href="../Insight21.css" type="text/css" rel="stylesheet" />
</head>
<body>
    <form id="financialSummaryForm" method="post" runat="server">
        <div>
            <table class="Container">
                <tr>
                    <td>
                        <table class="Header" width="100%">
                            <tr>
                                <td>
                                    <cc1:Header ID="header" runat="server" OnNavigate="OnHeaderNavigate" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc1:AgreementsSubNavigation ID="agreementsSubNavigation" EnableOverviewNavigation="true"
                                        runat="server" OnNavigate="OnSubNavigate" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc2:BreadCrumb ID="breadCrumb" runat="server" OnNavigate="OnBreadCrumbNavigate" />
                                </td>
                            </tr>
                        </table>
                        <table class="FinancialSearchContainer" cellspacing="10">
                            <tr>
                                <td>
                                    <cc2:ExpandingPanel ID="expandingPanel" runat="server" ExpansionToggler="expansionToggler">
                                        <StaticTemplate>
                                            <table class="Search">
                                                <tr>
                                                    <td>
                                                        <cc1:CommonSearch ID="commonSearch" runat="server" ExtendedSearchControl="agreementSearch"
                                                            Field1ID="fundID" Field1Prompt="Fund #:" Field1Visible="True" Field2AutoCompleteServiceMethod="GetPIs"
                                                            Field2ID="piName" Field2Prompt="PI Name :" Field2Style="" Module="Agreements"
                                                            OnClearSelection="OnClearSelection" OnSearch="OnSearch" PIPickerVisible="false" />
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="PanelSeparator">
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <cc2:ExpansionToggler ID="expansionToggler" runat="Server" CollapsedLinkCaption="Advanced Search Options"
                                                            ExpandedLinkCaption="Advanced Search Options" CollapsedImage="~/Images/Arrow_RT.gif"
                                                            ExpandedImage="~/Images/Arrow_DN.gif" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </StaticTemplate>
                                        <DynamicTemplate>
                                            <table class="Search">
                                                <tr>
                                                    <td>
                                                        <cc1:AgreementSearch ID="agreementSearch" runat="server" ShowDefaultFund="True" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </DynamicTemplate>
                                    </cc2:ExpandingPanel>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc1:SearchCriteriaDisplay ID="searchCriteriaDisplay" runat="server" />
                                </td>
                            </tr>
                        </table>
                        <table id="dynamicTable" class="Invisible" cellspacing="10">
                            <tr>
                                <td>
                                    <cc2:ActivityIndicator ID="activityIndicator" runat="server" ContainerID="dynamicTable" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <cc2:Annunciator ID="annunciator" runat="server" ContainerID="dynamicTable" />
                                </td>
                            </tr>
                        </table>
                        <table class="PlaceBar">
                            <tr>
                                <td class="PageName">
                                    Financial Summary
                                </td>
                                <td align="left" valign="top">
                                    <asp:RadioButtonList ID="costOption" runat="server" AutoPostBack="True" CssClass="RadioButtonList"
                                        RepeatDirection="Horizontal" OnSelectedIndexChanged="OnCostOptionChange" RepeatLayout="Flow">
                                        <asp:ListItem Value="False">Direct Costs</asp:ListItem>
                                        <asp:ListItem Selected="True" Value="True">Total Costs</asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td>
                                    <cc1:RefreshDates ID="refreshDates" runat="server" Visible="True" />
                                </td>
                                <td>
                                    <cc1:InsightDownloadBar ID="downloadBar" runat="server" useRootHost="true" SQLReportName="financialSummary" />
                                </td>
                            </tr>
                        </table>
                        <table width="100%" cellspacing="0">
                            <tr>
                                <td>
                                    <cc2:Pager ID="pagerAboveDatagrid" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                                        OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:DataGrid ID="dataGrid" Width="100%" runat="server" ShowFooter="True" AutoGenerateColumns="False"
                                        AllowSorting="True" AllowPaging="True" CssClass="DataGrid" AllowCustomPaging="True"
                                        DataKeyField="FundID" OnItemCommand="OnDataGridItemCommand" OnItemCreated="OnItemCreated"
                                        OnItemDataBound="OnItemDataBound" OnSortCommand="OnSort">
                                        <FooterStyle CssClass="DataGridFooter" />
                                        <AlternatingItemStyle CssClass="DataGridAlternatingItem" />
                                        <ItemStyle CssClass="DataGridItem" HorizontalAlign="Left" Wrap="False" />
                                        <HeaderStyle CssClass="DataGridHeader" HorizontalAlign="Left" />
                                        <Columns>
                                            <asp:BoundColumn DataField="AgreementType" SortExpression="AgreementType" HeaderText="Type">
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:BoundColumn>
                                            <asp:ButtonColumn ButtonType="LinkButton" DataTextField="FundNumber" SortExpression="FundNumber"
                                                HeaderText="<nobr>Fund #" CommandName="AgreementsBudgetOverview.aspx" />
                                            <asp:BoundColumn DataField="PILastFirstName" ItemStyle-Wrap="False" SortExpression="PILastFirstName"
                                                HeaderText="PI Name" />
                                            <asp:BoundColumn DataField="TotalBudgetAmount" SortExpression="TotalBudgetAmount"
                                                HeaderText="Total Budget Amount  ">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:BoundColumn>
                                            <asp:ButtonColumn DataTextField="LastMoExpenses" SortExpression="LastMoExpenses"
                                                HeaderText="Last Month Expenses" CommandName="AgreementsExpenseOverview.aspx,LastMoExpenses">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:ButtonColumn DataTextField="ExpensesToDate" SortExpression="ExpensesToDate"
                                                HeaderText="Expenses To Date" CommandName="AgreementsExpenseOverview.aspx,ExpensesToDate">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:ButtonColumn DataTextField="BudgetBalance" SortExpression="BudgetBalance" HeaderText="Budget Balance"
                                                CommandName="AgreementsBudgetOverview.aspx">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:ButtonColumn DataTextField="Revenue" SortExpression="Revenue" HeaderText="Revenue"
                                                CommandName="AgreementsRevenueBreakdown.aspx">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:BoundColumn DataField="CurrentCashBalance" SortExpression="CurrentCashBalance"
                                                HeaderText="Current Cash Balance">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:BoundColumn>
                                            <asp:ButtonColumn DataTextField="OpenPOAPBalance" SortExpression="OpenPOAPBalance"
                                                HeaderText="Open PO/AP Orders" CommandName="TransactionDetails.aspx">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:ButtonColumn DataTextField="PlannedSalary" SortExpression="PlannedSalary" HeaderText="Planned Salary"
                                                CommandName="SalariesOverview.aspx">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:ButtonColumn DataTextField="ProjectedBalance" SortExpression="ProjectedBalance"
                                                HeaderText="Projected Balance Remaining" CommandName="AgreementProjections.aspx">
                                                <ItemStyle HorizontalAlign="Right" />
                                                <FooterStyle HorizontalAlign="Right" />
                                            </asp:ButtonColumn>
                                            <asp:BoundColumn DataField="ProjectStartDate" DataFormatString="{0:MM/dd/yyyy}" SortExpression="ProjectStartDate"
                                                HeaderText="Project Start" />
                                            <asp:BoundColumn DataField="ProjectEndDate" DataFormatString="{0:MM/dd/yyyy}" SortExpression="ProjectEndDate"
                                                HeaderText="Project End" />
                                            <asp:BoundColumn DataField="BudgetStartDate" DataFormatString="{0:MM/dd/yyyy}" SortExpression="BudgetStartDate"
                                                HeaderText="Budget Start" />
                                            <asp:BoundColumn DataField="BudgetEndDate" DataFormatString="{0:MM/dd/yyyy}" SortExpression="BudgetEndDate"
                                                HeaderText="Budget End" />
                                        </Columns>
                                        <PagerStyle Visible="False" />
                                    </asp:DataGrid></td>
                            </tr>
                            <tr>
                                <td>
                                    <cc2:Pager ID="pagerBelowDatagrid" runat="server" OnFirstPage="OnFirstPage" OnLastPage="OnLastPage"
                                        OnNextPage="OnNextPage" OnPreviousPage="OnPreviousPage" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
